package com.quartet.modules.service.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quartet.modules.service.dto.TServiceClickCountResponseDto;
import com.quartet.modules.service.dto.TServiceInfoResponseDto;
import com.quartet.modules.service.entity.TServiceInfo;
import com.quartet.modules.statistics.dto.ServiceStatisticsRequestDto;
import com.quartet.modules.statistics.dto.ServiceStatisticsResponseDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 服务信息表(TServiceInfo)表数据库访问层
 *
 * @author makejava
 * @since 2021-05-24 17:51:07
 */
public interface TServiceInfoDao extends BaseMapper<TServiceInfo> {

    /**
     * 功能描述: 给此此订单的此服务自增一次
     *
     * @param serviceType
     * @param orderCodeList
     * @return void
     * @author huipanxing huipanxing@chinasofti.com
     * @date 2021/6/11 9:34
     */
    void increaseCount(@Param("serviceType") String serviceType, @Param("orderCodeList") List<String> orderCodeList);

    /**
     * 功能描述: 按照小时分组查询服务个数
     * @author huipanxing huipanxing@chinasofti.com
     * @date 2021/7/16 11:05
     * @param serviceStatisticsRequestDto
     * @return java.util.List<com.quartet.modules.statistics.dto.ServiceStatisticsResponseDto>
     */
    List<ServiceStatisticsResponseDto> queryServiceStatisticsDataWithHour(ServiceStatisticsRequestDto serviceStatisticsRequestDto);

    /**
     * 功能描述: 按照天分组查询服务个数
     * @author huipanxing huipanxing@chinasofti.com
     * @date 2021/7/16 11:05
     * @param serviceStatisticsRequestDto
     * @return java.util.List<com.quartet.modules.statistics.dto.ServiceStatisticsResponseDto>
     */
    List<ServiceStatisticsResponseDto> queryServiceStatisticsDataWithDay(ServiceStatisticsRequestDto serviceStatisticsRequestDto);

    /**
     * 功能描述: 按照客戶和服务类型分组查询服务调用次数
     * @author huipanxing huipanxing@chinasofti.com
     * @date 2021/7/16 11:05
     * @param serviceStatisticsRequestDto
     * @return java.util.List<com.quartet.modules.statistics.dto.ServiceStatisticsResponseDto>
     */
    List<TServiceClickCountResponseDto> queryServiceStatisticsList(ServiceStatisticsRequestDto serviceStatisticsRequestDto);
}